package org.belkodevelop.geocoding.domen;

import java.io.Serializable;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;

@Entity
@Table(name = "geo_cache")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class GeoCache implements Serializable {
    
    @Id
    @Column(length = 1500, nullable = false, unique=true)
    private String request;
    
    @Type(type="text")
    @Column(nullable = false)
    private String responce;
    
    @Column(name = "date_edit", nullable = false)
    private Timestamp dateEdit = new Timestamp(new java.util.Date().getTime());
    
    @Column(length = 20, nullable = false)
    private String status;

    public String getRequest() {
        return request;
    }

    public void setRequest(String request) {
        this.request = request;
    }

    public String getResponce() {
        return responce;
    }

    public void setResponce(String responce) {
        this.responce = responce;
    }

    public Timestamp getDateEdit() {
        return dateEdit;
    }

    public void setDateEdit(Timestamp dateEdit) {
        this.dateEdit = dateEdit;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
    
}
